<% content_for("page_specific_styles") do -%>

    <style type="text/css">

        .comment {
            background: infobackground;
            border: 5px solid white;
            width: 500px;
            padding-bottom: 25px;
        }

        .comment_body {
            font-weight: bold;
            width: 400px;
        }

        .comment_status {
            padding-top: 10px;
            font-style: italic;
        }

        .comment_info {
            font-style: italic;
        }

        .comment_links {
            padding-top: 10px;
            float: right;
            width: 100%;
            text-align: right;
        }

        .comment_open {
            color: red;
        }

        .comment_action_taken {
            color: blue;
        }

        .comment_verified {
            color: green;
            font-weight: bold;
        }

    </style>


<% end -%>


<h2>Details for <%= h @bug.defect_type %>:   <%= h @bug.defect_id %> </h2>

<% if @bug.customer_issue %>
<img src="/images/icons/critical2.png"/>
<% end %>

<div id="bugs_and_comments_area" style="width: 900px;">
  <div id="bug_area" style="float: left; width: 400px; padding-right: 10px; ">
    <% form_for(@bug) do |f| %>
        <%= f.error_messages %>

        <p>
          <strong>Priority:</strong>
          <%= h @bug.priority %>
        </p>

        <p>
          <strong>Summary:</strong>
          <%= h @bug.summary %>
        </p>

        <p>
          <%= f.label :developer %><br/>
          <%= collection_select(:bug, :developer_id, Member.all, :id, :nickname, :include_blank => true) %>
        </p>

        <p>
          <%= f.label :status %><br/>
          <%= collection_select(:bug, :status_id, Status.find_by_user_role(session[:user].admin?), :id, :description, :include_blank => true) %>
        </p>

        <p>
          <%= "Is review done and RADAR updated with issues found?" %> <%= check_box(:bug, :reviewed) %> <br/>
          <%= "Reviewer" %> <%= collection_select(:bug, :reviewer_id, Member.all, :id, :nickname, :include_blank => true) %>
        </p>

        <p>
          <%= f.label :release %><br/>
          <%= collection_select(:bug, :release_id, Release.all, :id, :release_number, :include_blank => true) %>
        </p>

        <p>
          <%= f.submit 'Save' %>
        </p>
    <% end %>


    <br/>
    <%= link_to 'Defects and CRs View', bugs_path %>
    <br/><br/>
    <%= link_to 'Dash Board View', :controller => "releases", :action => :taskboard %>
  </div>

  <div id="comments_area" style="float: right; clear: right; width: 400px;">
    <h3>Comments <img src="/images/icons/onebit_comment.png" alt="" /></h3> 
    <%= link_to_remote 'Add a new comment', :url => new_bug_comment_path(@bug), :update => 'comments_form', :method => :get %>

    <div id="comments_form">
    </div>

    <div id="comments">
      <%= render :partial => '/comments/singlecomment',  :collection => @bug.comments %>
    </div>

  </div>

</div>


